home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / windownt / perlnt.zip / t / op / magic.nt < prev    next >
Text File  |  1993-07-25  |  542b  |  22 lines

  1. #!./perl
  2.  
  3. # $Header: magic.t,v 4.0 91/03/20 01:53:35 lwall Locked $
  4.  
  5. $| = 1;        # command buffering
  6.  
  7. print "1..3\n";
  8.  
  9. eval '$ENV{"foo"} = "hi there";';    # check that ENV is inited inside eval
  10. if (`echo %foo%` eq "hi there\n") {print "ok 1\n";} else {print "not ok 1\n";}
  11.  
  12. unlink 'ajslkdfpqjsjfk';
  13. $! = 0;
  14. open(foo,'ajslkdfp');
  15. if ($! == 2) {print "ok 2\n";} else {print "not ok 2\n";}
  16.  
  17. @val1 = @ENV{keys(%ENV)};    # can we slice ENV?
  18. @val2 = values(%ENV);
  19.  
  20. print join(':',@val1) eq join(':',@val2) ? "ok 3\n" : "not ok 3\n";
  21.  
  22.